package com.mingtai.design.pattern.structuralming.decorator;

/**
 * @description:
 * @author: mingtai
 * @createDate: 23:37 2021/1/11
 * @version: 1.0
 */

public class SausageDecorator extends AbstractDecorator {
    public SausageDecorator(ABattercake aBattercake) {
        super(aBattercake);
    }

    // 添加一根香肠
    @Override
    protected String getDesc() {
        return super.getDesc() + " 加一根香肠 ";
    }

    // 每根香肠售价2元
    @Override
    protected int cost() {
        return super.cost() + 2;
    }
}



